<div>
	<link href="./pages/workflow/instance/common/instanceInfo.css" rel="stylesheet" type="text/css">
	<yu-panel title="我的待办">
		<el-tabs value="first" type="card" @tab-click="tabClick">
			<el-tab-pane label="流程操作" name="first">
				<el-collapse v-model="collapseValue">
					<el-collapse-item title="业务信息" name="1">
						<div id="nwfbiztypePage">
						</div>
					</el-collapse-item>
					<el-collapse-item title="流程审批信息" name="3">
						<el-form label-width="150px" :model="instanceIdInfo" :disabled="collapse2FormDisable">
							<el-form-item label="流程实例ID">
								<el-input v-model="instanceIdInfo.instanceId" :disabled="collapse2FormDisable"></el-input>
							</el-form-item>
							<el-form-item label="流程流水号">
								<el-input v-model="instanceIdInfo.bizId" :disabled="collapse2FormDisable"></el-input>
							</el-form-item>
							<el-form-item label="流程名称">
								<el-input v-model="instanceIdInfo.flowName" :disabled="collapse2FormDisable"></el-input>
							</el-form-item>
							<el-form-item label="发起者姓名">
								<el-input v-model="instanceIdInfo.flowStarterName" :disabled="collapse2FormDisable"></el-input>
							</el-form-item>
							<el-form-item label="客户名称">
								<el-input v-model="instanceIdInfo.bizUserName" :disabled="collapse2FormDisable"></el-input>
							</el-form-item>
							<el-form-item label="客户ID">
								<el-input v-model="instanceIdInfo.bizUserId" :disabled="collapse2FormDisable"></el-input>
							</el-form-item>
							<el-form-item label="当前节点">
								<el-input v-model="instanceIdInfo.nodeId" :disabled="collapse2FormDisable"></el-input>
							</el-form-item>
							<el-form-item label="当前节点名称">
								<el-input v-model="instanceIdInfo.nodeName" :disabled="collapse2FormDisable"></el-input>
							</el-form-item>
							<el-form-item label="节点受理时间">
								<el-input v-model="instanceIdInfo.startTime" :disabled="collapse2FormDisable"></el-input>
							</el-form-item>
							<el-form-item label="上一节点">
								<el-input v-model="instanceIdInfo.lastNodeId" :disabled="collapse2FormDisable"></el-input>
							</el-form-item>
							<el-form-item label="上一节点名称">
								<el-input v-model="instanceIdInfo.lastNodeName" :disabled="collapse2FormDisable"></el-input>
							</el-form-item>
							<el-form-item label="上一节点审批状态">
								<el-input v-model="instanceIdInfo.nodeStateName" :disabled="collapse2FormDisable"></el-input>
							</el-form-item>
							<el-form-item label="业务类型">
								<el-input v-model="instanceIdInfo.bizType" :disabled="collapse2FormDisable"></el-input>
							</el-form-item>
						</el-form>
					</el-collapse-item>
					<el-collapse-item title="提交处理" name="4">
						<el-form ref="commentForm" label-width="160px" :model="commentInfo" :rules="commentRules">
							<el-form-item label="主键">
								<el-input v-model="commentInfo.commentId" :disabled="collapse2FormDisable"></el-input>
							</el-form-item>
							<el-form-item label="意见" prop="userComment">
								<el-input type="textarea" v-model="commentInfo.userComment" :disabled="button.signIn==1"></el-input>
							</el-form-item>
							<el-form-item class="box-card">
								<el-button @click="cancel">取消</el-button>
								<el-button type="primary" @click="saveComment" :disabled="button.signIn==1">保存</el-button>
								<el-button type="primary" @click="submitFn('O-12')" :disabled="button.signIn=='1'">同意</el-button>
								<el-button type="primary" @click="submitFn('O-8')" :disabled="(button.signIn==1||button.refuse==0)">否决</el-button>
								<el-button type="primary" @click="signIn" :disabled="button.signIn!=1">签收</el-button>
								<el-button type="primary" @click="unSignIn" :disabled="button.unSignIn!=1">撤销签收</el-button>
								<el-button type="primary" @click="callBackFn" :disabled="(button.signIn!='0'||button.callBack==0)">打回</el-button>
								<el-button type="primary" @click="returnBackFn" :disabled="(button.signIn!='0'||button.returnBack==0)">退回</el-button>
								<el-button type="primary" @click="submitFn('O-9')" :disabled="(button.signIn!='0'||button.jump==0)">跳转</el-button>
								<el-button type="primary" @click="submitFn('O-6')" :disabled="(button.signIn!='0'||button.change==0)">转办</el-button>
								<el-button type="primary" @click="submitFn('O-7')" :disabled="(button.signIn!='0'||button.assist==0)">协办</el-button>
								<el-button type="primary" @click="wfGatherFn" :disabled="(button.signIn!='0'||button.gather==0)">会办</el-button>
								<el-button type="primary" @click="unSignInTaskPool" :disabled="(button.taskPoolId == '0')" v-if="button.taskPoolId != '0'">放回项目池</el-button>
								<el-button type="primary" @click="subFlowStart" :disabled="(button.subFlowId == '0')" v-if="(button.subFlow == '0'||button.subFlow == '1')">发起子流程</el-button>
							</el-form-item>
						</el-form>
					</el-collapse-item>
				</el-collapse>
			</el-tab-pane>
			<el-tab-pane label="审批历史" name="second">
				<div style="height: 20px;" align="center">{{commentinfo}}</div>
				<el-collapse accordion>
					<el-collapse-item v-for="(node,index) in nodeHistory" :title="node.startTime+'  '+node.nodeName" :key="index" :name="index">
						<el-card class="box-card">
							<yu-xform ref="refFormDemo" label-width="120px" form-type="details" disabled>
								<yu-xform-group :column='3'>
									<yu-xform-item label="审批节点名称" ctype="input" name="type" :value="node.nodeName"></yu-xform-item>
									<yu-xform-item label="办理人员名称" ctype="input" name="author" :value="node.userName"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #00aa7f;" :value="node.commentSign" v-if="node.commentSign == '同意'"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #ff0000;" :value="node.commentSign" v-if="node.commentSign == '打回'"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #ff5500;" :value="node.commentSign" v-if="node.commentSign == '退回'"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #ffaa00;" :value="node.commentSign" v-if="node.commentSign == '拿回'"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #ff0000;" :value="node.commentSign" v-if="node.commentSign == '催办'"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #00aaff;" :value="node.commentSign" v-if="node.commentSign == '协办'"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #00aaff;" :value="node.commentSign" v-if="node.commentSign == '转办'"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #00aa7f;" :value="node.commentSign" v-if="node.commentSign == '跳转'"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #ff5500;" :value="node.commentSign" v-if="node.commentSign == '否决'"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #000000;" :value="node.commentSign" v-if="node.commentSign == '自动提交'"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #ff5500;" :value="node.commentSign" v-if="node.commentSign == '撤回'"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #55aa00;" :value="node.commentSign" v-if="node.commentSign == '发起'"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #00aaff;" :value="node.commentSign" v-if="node.commentSign == '正常结束'"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #ffaa00;" :value="node.commentSign" v-if="node.commentSign == '抄送'"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #ffaa00;" :value="node.commentSign" v-if="node.commentSign == '委托'"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #55aa00;" :value="node.commentSign" v-if="node.commentSign == '唤醒'"></yu-xform-item>
									<yu-xform-item label="审批结果" ctype="input" name="tel" style="color: #ff5500;" :value="node.commentSign" v-if="node.commentSign == '挂起'"></yu-xform-item>
									<yu-xform-item label="审批时间" name="time" :value="node.startTime"></yu-xform-item>
									<yu-xform-item label="办理人员" ctype="input" name="status" :value="node.userId"></yu-xform-item>
									<yu-xform-item label="审批节点编号" ctype="input" name="nodeID" :value="node.nodeId"></yu-xform-item>
									<yu-xform-item label="审批意见" colspan="24" name="content" ctype="textarea" :value="node.userComment"></yu-xform-item>
									<yu-xform-item label="扩展意见" colspan="24" name="ext" ctype="textarea" :value="node.ext"></yu-xform-item>
								</yu-xform-group>
							</yu-xform>
						</el-card>
					</el-collapse-item>
				</el-collapse>
			</el-tab-pane>
			<el-tab-pane label="参数修改" name="3">
				<el-card class="box-card">
					<el-form ref="paramFrom">
						<el-form-item v-for="item in flowParam" :label="item.key">
							<el-input v-model="item.value"></el-input>
						</el-form-item>
					</el-form>
				</el-card>
			</el-tab-pane>
			<el-tab-pane label="会办详情" name="4" v-if="button['gather']!='0'">
				<div id="gatherHandleId">

				</div>
			</el-tab-pane>
		</el-tabs>
	</yu-panel>
	<el-dialog :title="agreeNodeSelect.title" :visible.sync="agreeNodeSelect.showDialog" @open="agreeDialogOpen" @close="agreeDialogClose">
		<el-form ref="form" label-width="20px" align="center">
			<el-radio-group v-model="agreeRadio" @change="agreeRadioChange" style="width:auto;padding-left: 20px;" v-show="agreeShowRadio">
				<el-form-item v-for="(node,index) in agreeNextNodes" style="min-width: 380px;" align="left">
					<el-col :span="6">
						<el-radio :label="node.nodeId">{{node.nodeName}}</el-radio>
					</el-col>
					<el-col :span="9">
						<el-row :gutter=2>
							<el-col :span="14">
								<el-input v-model="node.userSelected" type="textarea" readonly autosize></el-input>
							</el-col>
							<el-col :span="8">
								<el-button @click="agreeSelectNodeUser(node,index)" v-if="node.isSysUser != true && node.selected == true">选择</el-button>
							</el-col>
						</el-row>
					</el-col>
					<el-col :span="8" v-show="node.nodeType != 'E'">
						<el-row :gutter=2>
							<el-col :span="12">
								<el-input v-model="node.copyUser" type="input" readonly autosize></el-input>
							</el-col>
							<el-col :span="8">
								<el-button @click="agreeSelectCopyUser(node,index)">抄送</el-button>
							</el-col>
						</el-row>
					</el-col>
				</el-form-item>
			</el-radio-group>
			<el-checkbox-group v-model="agreeCheckBox" v-show="!agreeShowRadio" @change="agreeRadioChange">
				<el-form-item v-for="(node,index) in agreeNextNodes" style="min-width: 380px;" align="left">
					<el-col :span="6">
						<el-checkbox :label="node.nodeId" :key="node.nodeId" :checked="node.selected == true">{{node.nodeName}}</el-checkbox>
					</el-col>
					<el-col :span="9">
						<el-row :gutter=2>
							<el-col :span="14">
								<el-input v-model="node.userSelected" type="input" readonly autosize></el-input>
							</el-col>
							<el-col :span="8">
								<el-button @click="agreeSelectNodeUser(node,index)" v-if="node.isSysUser != true && node.selected == true">选择</el-button>
							</el-col>
						</el-row>
					</el-col>
					<el-col :span="8" v-show="node.nodeType != 'E'">
						<el-row :gutter=2>
							<el-col :span="12">
								<el-input v-model="node.copyUser" type="input" readonly autosize></el-input>
							</el-col>
							<el-col :span="8">
								<el-button @click="agreeSelectCopyUser(node,index)">抄送</el-button>
							</el-col>
						</el-row>
					</el-col>
				</el-form-item>
			</el-checkbox-group>
			<el-checkbox-group>
				<el-form-item v-if="(instanceIdInfo.handleType==5||instanceIdInfo.handleType==6)" style="min-width: 380px;" align="left">
					<el-col style="width:auto;padding-left: 125px;">
						<el-row>
							<el-radio v-model="agreeIsLastRadio" label="N">不提前提交</el-radio>
							<el-radio v-model="agreeIsLastRadio" label="Y">提前提交</el-radio>
						</el-row>
					</el-col>
				</el-form-item>
			</el-checkbox-group>
		</el-form>
		<div slot="footer">
			<el-button type="primary" @click="agreeFn">提交</el-button>
		</div>
	</el-dialog>

	<el-dialog :title="agreeNodeSelect.userTitle" :visible.sync="agreeNodeSelect.showUserDialog">
		<el-card class="box-card" v-show="agreeNextNodes[agreeIndex]!=undefined">
			<el-tag v-for="tag in agreeNextNodes[agreeIndex].userInfos" :key="tag.userId" type="success" closable @close="agreeTagClose(tag)">
				{{tag.userName}}
			</el-tag>
		</el-card>
		<el-table ref="agreeUserTableRef" :data="agreeNodeSelect.userTableData" @row-dblclick="agreeRowDbClick">
			<el-table-column prop="userId" label="用户ID">
			</el-table-column>
			<el-table-column prop="userName" label="姓名" width="180">
			</el-table-column>
		</el-table>
		<el-pagination background layout="total, sizes, prev, pager, next, jumper" :page-sizes="[10, 20, 30]" :page-size="pagesize"
		 :total="agreeNodeSelect.userTableData.length" @current-change="currpageChange" @size-change="pagesizeChange">
		</el-pagination>
		<div style="margin-top: 20px">
			<el-button @click="agreeUserClose">选取返回</el-button>
		</div>
	</el-dialog>
	<el-dialog :title="callbackNodeSelect.title" :visible.sync="callbackNodeSelect.showDialog" height="300px" @open="backDialogOpen"
	 @close="wfCallBackClose">
		<el-tabs v-model="backActiveName" type="card">
			<el-tab-pane label="打回节点" name="first" align="center">
				<el-row style="margin-top: 20px;" align="center">
					<el-col>
						<el-radio-group v-model="backNodeModel" @change="radioChange" style="width:600px;" align="left">
							<el-row :gutter=10 v-for="(item,index) in backNodes" :key="item.nodeId">
								<el-col :span="8" font-size="14px">
									<el-radio :label="item.nodeId" :key="item.nodeName">{{item.nodeId+'-'+item.nodeName}}</el-radio>
								</el-col>
								<el-col :span="16">
									<el-radio-group v-model="userModel" v-show="item.selected">
										<el-radio v-for="(item1,index1) in item.usersList" :label="item1.userId" :key="item1.userName" font-size="14px">{{item1.userName}}</el-radio>
									</el-radio-group>
								</el-col>
							</el-row>
						</el-radio-group>
					</el-col>
				</el-row>
			</el-tab-pane>
			<el-tab-pane label="打回后节点提交方式" name="second" align="center">
				<el-form ref="form" align="center">
					<el-form-item style="margin-bottom: 15px;"></el-form-item>
					<el-form-item align="center">
						<el-radio-group v-model="backnode" align="center">
							<el-radio :label="0">直接提交到打回节点</el-radio>
							<el-radio :label="1">沿流程路径逐级提交</el-radio>
						</el-radio-group>
					</el-form-item>
				</el-form>
			</el-tab-pane>
		</el-tabs>
		<div slot="footer" align="center">
			<el-button type="primary" @click="wfCallBack">确 定</el-button>
			<el-button @click="wfCallBackClose">取 消</el-button>
		</div>
	</el-dialog>
	<el-dialog :title="jumpNodeSelect.title" :visible.sync="jumpNodeSelect.showDialog" height="300px" @close="jumpClose">
		<el-form ref="form" label-width="120px">
			<el-radio-group v-model="jumpNodeModel" @change="jumpradioChange" style="width:600px;margin-left: auto;">
				<el-form-item v-for="(node,index) in jumpNodes" style="margin: auto;">
					<el-col :span="8">
						<el-radio :label="node.nodeId">{{node.nodeId+'-'+node.nodeName}}</el-radio>
					</el-col>
					<el-col :span="12" v-show="node.selected">
						<el-input v-model="node.selectUser.userName" type="textarea" autosize></el-input>
					</el-col>
					<el-col :span="4" v-show="node.selected">
						<el-button @click="jumpSelectUser(node,index)">选择</el-button>
					</el-col>
				</el-form-item>
			</el-radio-group>
		</el-form>
		<div slot="footer" align="center">
			<el-button type="primary" @click="jumpFn()">确 定</el-button>
			<el-button @click="jumpClose">取 消</el-button>
		</div>
	</el-dialog>
	<el-dialog :title="UserSelect[title]" :visible.sync="UserSelect.showUserDialog">
		<el-card class="box-card" v-show="true">
			<el-tag v-for="tag in UserSelect.SelectUsers" :key="tag.userId" type="success" closable @close="TagClose(tag)">
				{{tag.userName}}
			</el-tag>
		</el-card>
		<el-table ref="UserTableRef" :data="UserSelect.Users" @row-dblclick="RowDbClick">
			<el-table-column prop="userId" label="用户ID">
			</el-table-column>
			<el-table-column prop="userName" label="姓名">
			</el-table-column>
		</el-table>
		<el-pagination background layout="total, sizes, prev, pager, next, jumper" :page-sizes="[5, 10, 15, 20]" :page-size="pagesize"
		 :total="UserSelect.Users.length">
		</el-pagination>
		<div style="margin-top: 20px">
			<el-button v-if="title=='jump'||title=='copy'" @click="UserDialogClose">选取返回</el-button>
			<el-button type="primary" v-if="title=='change'" @click="UserDialogClose">确定转办</el-button>
			<el-button type="primary" v-if="title=='assist'" @click="UserDialogClose">确定协办</el-button>
		</div>
	</el-dialog>
</div>